<?php 

$cont=StaticPages::model()->find('slug=?',array('home'));

// $cont->content;  ?>

                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="61%" align="left" valign="top"><table width="92%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="29%" rowspan="2" align="left" valign="top"><img src="<?php echo ApplicationConfig::app()->params['theme']['imageUrl']?>rose2.jpg" width="104" height="83" alt="" /></td>
                           
                          </tr>
                          <tr>
                            <td align="left" valign="top" class="text1" width="20px" height="20px">
                             <?php $model = StaticPages::model()->getModel('BY-SLUG', array('slug'=>'welcome_full'));
                             //echo $model->content; 
                               echo applicationconfig::truncatestring($model->content, 400);
                              $this->widget('application.extensions.fancybox.EFancyBox', 
                              array( 'target'=>'a#more', 
                              'config'=>array( 
                              'titleShow' => true, 
                               'height' =>'50%',
                               'width'  =>'50%',
                               'scrolling' => 'No',
                                   )
                                  )
                                );

                             ?>

                              <div style="text-align:right; padding-top:8px;"><a id="more" href="<?php echo ApplicationConfig::getURL("", "wedding", "Welcome") ?>">Read more</a></div></td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top" style="padding-top:19px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          
                          <tr>
                            <td width="70%" align="left" valign="top" style="padding-left:5px;">
                              <span class="text1">
                             <?php $model = StaticPages::model()->getModel('BY-SLUG', array('slug'=>'our_site_full'));
                              echo applicationconfig::truncatestring($model->content, 600);?>
                              </span></td>
                            <td width="30%" align="right" valign="top"><img src="<?php echo ApplicationConfig::app()->params['theme']['imageUrl']?>index_39.gif" width="104" height="83" alt="" /></td>
                          </tr>
                          <tr>
                            <td colspan="2" align="left" valign="top" class="text1" style="padding-top:15px;"><div style="text-align:right;"><a id="more" href="<?php echo ApplicationConfig::getURL("", "wedding", "Oursite") ?>">Read more</a></div></td>
                            </tr>
                        </table></td>
                      </tr>
                    </table></td>
                    <td width="39%" align="left" valign="top"><table width="96%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                         
                          <tr>
                            <td align="left" valign="top" class="text1">
                              <?php $model = StaticPages::model()->getModel('BY-SLUG', array('slug'=>'our_parents_full'));
                             echo applicationconfig::truncatestring($model->content,450);?></td>
                           </tr>
                           <tr>
                              <td colspan="2" align="left" valign="top" class="text1" style="padding-top:15px;"><div style="text-align:right;"><a id="more" href="<?php echo ApplicationConfig::getURL("", "wedding", "Ourparents") ?>">Read more</a></div></td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="left" valign="top" style="padding-top:20px;"><img src="<?php echo ApplicationConfig::app()->params['theme']['imageUrl']?>index_35.gif" width="220" height="34" alt="" /></td>
                          </tr>
                          <tr>
                            <td align="left" valign="top" style="padding-top:20px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                  <?php 
                                  $album=Album::model()->findAll();
                                  $count=0;
                                    foreach($album as $albums){
                                      $id=$albums->id;
                                      $cover=$albums->image;
                                      if($count < 2){
                                ?>
                                <td>
                                  <a href="<?php echo Yii::app()->createUrl('wedding/photo/id/'.$id) ?>" ><img src="<?php echo Yii::app()->baseUrl; ?>/photos/<?php echo $cover; ?>" width=100 height=100></a><br/><br/>
                                  <div style="margin-left:30px;">
                                  <?php echo $albums->title; ?>
                                </div>
                                </td>
                              <?php
                                $count++;
                              }
                            }
                                ?>
                              </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td align="left" valign="top" class="text1" style="padding-top:12px;"><div style="text-align:center;"><a href="<?php echo ApplicationConfig::getURL("","wedding","photoalbum")?>">Read more</a></div></td>
                          </tr>
                        </table></td>
                      </tr>
                    </table></td>
                  </tr>
                </table>
